#include <workflow/WFFacilities.h>
#include <workflow/WFTaskFactory.h>
#include <signal.h>
#include <iostream>
using std::cout;
static WFFacilities::WaitGroup waitGroup(1);
void sighandler(int signum){
    waitGroup.done();
}
int main(){
    signal(SIGINT,sighandler);
    // 创建一个任务
    WFHttpTask * httpTask = WFTaskFactory::create_http_task(
        "http://192.168.72.128/en/index.html",10,10,nullptr
    );
    // 启动任务（把任务交给框架，由框架调度资源运行任务）
    httpTask->start(); //在此之后任务就不受用户控制
    waitGroup.wait();
    return 0;
}